package com.jz.util;


import com.jz.bean.InfoBean;

import javax.json.Json;
import javax.json.JsonBuilderFactory;

/**
 * Created by Administrator on 2015/10/23.
 */
public class JasonSupport {
    private static final JsonBuilderFactory bf = Json.createBuilderFactory(null);
    /**
     * 转换信息
     * */
    public static String convertInfo(InfoBean bean) {
        return bf.createObjectBuilder()
                .add("nodeame", bean.getNodeName())
                .add("message", bean.getMessage())
                .add("updatetime", bean.getUpdateTime())
                .add("type", bean.getType().toString()).build().toString();
    }
}
